package com.yj.core.result;

/**
 * 基本异常信息定义
 *
 * @author xs
 */
public enum BaseExceptionMsg implements IExceptionMsg {

    EXECUTE_OK(0, "执行成功"),
    QUERY_OK(0, "查询成功"),
    EXECUTE_FAILD(-1, "执行失败"),
    PARAM_INVALID(100, "业务参数传入错误"),
    CAS_FAIL(110, "乐观锁错误"),
    GET_REDIS_LOCK_FAIL(111, "未获取到redis锁"),

    USER_NOT_PHONE(110, "用户没有注册手机号"),
    VERIFICATIONCODE_IS_NULL(111, "验证码不存在"),
    VERIFICATIONCODE_IS_EXPIRE(112, "验证码过期"),
    VERIFICATIONCODE_IS_ERROR(113, "验证码错误"),
    DIC_NOT_EXSITS(114, "字典项不存在"),

    MICROSERVICENAME_NOT_EXIST(109, "微服务不存在"),
    GET_RES_ERROR(116, "获取信息失败,系统服务开小差"),
    PHONE_NOT_REGISTER(117, "手机号没有注册"),
    DATA_EXIST(118, "新增数据已存在,请勿重复操作"),
    OPERATION_NOT_SUPPORTED(119, "不支持的操作"),

    USER_NOT_EXIST(120, "用户不存在"),
    PHONE_NOT_EXIST(121,"该密保手机号不存在"),
    USERNAME_NOT_MATCH_PHONE(122,"密保手机和用户名不匹配"),

    REGISTER_USER_NOT_EXIST(123,"该身份证号不存在或未认证！"),
    NAME_CARD_NOT_SAME(124, "姓名和身份证信息不符！"),
    REGISTER_PHONE_NOT_EXIST(125,"原手机号与身份证信息不符！"),
    UPDATE_PHONE_REGISTERED(126, "您要修改的手机号已被认证,不支持修改！"),
    APPEAL_STATUS_AUDIT(127,"当前账号申诉已在审核中！"),
    SEND_MEG_TOO_FAST(128, "发送短信过于频繁，请稍后重试!"),


    CURRENT_THREAD_GET_LOCK_FAIL(150, "当前线程获取锁失败!"),
    ;


    private Integer code;
    private String message;

    BaseExceptionMsg(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

}
